<div ng-controller='MemberIndex' class='right-cont'>
    <div class='title'>
        <i class='fa fa-list-ul'></i>
        会员管理{{test}}
    </div>

    <div class='box-cont'>
        <div>
            <!--<button class='btn btn-primary btn-sm btn-w-sm btn-shadow'
                    data-toggle='modal' data-target='.modal-add-user'>添加</button>

            <button class='btn btn-success btn-sm btn-w-sm btn-shadow'
                    ng-click='batch_change_status("resumeuser")'>启用</button>

            <button class='btn btn-warning btn-sm btn-w-sm btn-shadow'
                    ng-click='batch_change_status("forbiduser")'>禁用</button>

            <button class='btn btn-danger  btn-sm btn-w-sm btn-shadow'
                    ng-click='batch_change_status("deleteuser")'>删除</button>-->

            <div class='box-fr'>
                <div class='input-group input-group-xs pull-right radius'>
                    <input class='form-control radius' type='text' ng-model='nickname' placeholder='输入关键词'>
                    <span class='input-group-btn'>
                        <button class='btn btn-success radius' ng-click='load_data(1)'>搜索</button>
                    </span>
                </div>
            </div>
        </div>
        <div class="member-index-tab" ng-if="member_index_menu">
            <ul id="myTab" class="nav nav-tabs" style="margin-bottom: 10px;">
                <li class="member-index-tabs member-index-tabs-all active" data-role=".member-index-tabs-all"  ng-click="load_data(1)">
                    <a href="" data-toggle="tab">
                        全部
                    </a>
                </li>
                <li  class="member-index-tabs member-index-tabs-expand" data-role=".member-index-tabs-expand"  ng-click="load_data(1,102)">
                    <a href="" data-toggle="tab">
                        推广员({{roleNum.expand}})
                    </a>
                </li>
                <li  class="member-index-tabs member-index-tabs-teacher" data-role=".member-index-tabs-teacher" ng-click="load_data(1,105)">
                    <a href="" data-toggle="tab">
                        教师({{roleNum.teacher}})
                    </a>
                </li>
                <li  class="member-index-tabs member-index-tabs-parent" data-role=".member-index-tabs-parent" ng-click="load_data(1,106)">
                    <a href="" data-toggle="tab">
                        家长({{roleNum.parent}})
                    </a>
                </li>
            </ul>
        </div>
        <ol class="breadcrumb" ng-if="!member_index_menu">
            <li><span ng-click="load_data(1)">全部</span></li>
            <li ng-if="menu.dean" ng-click="seeDetails(menu.dean.id,menu.dean.role_id,1)"><span>{{menu.dean.nickname}}({{menu.dean.role_txt}})</span></li>
            <li ng-if="menu.expand" ng-click="seeDetails(menu.expand.id,menu.expand.role_id,1)"><span>{{menu.expand.nickname}}({{menu.expand.role_txt}})</span></li>
            <li ng-if="menu.teacher" ng-click="seeDetails(menu.teacher.id,menu.teacher.role_id,1)"><span>{{menu.teacher.nickname}}({{menu.teacher.role_txt}})</span></li>
            <li ng-if="menu.parent" ng-click="seeDetails(menu.parent.id,menu.parent.role_id,1)"><span>{{menu.parent.nickname}}({{menu.parent.role_txt}})</span></li>
            <li class="active">{{menu.userinfo.nickname}}({{menu.userinfo.role_txt}})</li>
            <!--<li><a ng-click="">全部</a></li>
            <li><a >2013</a></li>
            <li class="active">十一月</li>-->
        </ol><!--
        <div  ng-if="!member_index_menu">
            <cust-breadcrumb options="{{crumbOptions}}"></cust-breadcrumb>
        </div>-->


        <!--<hr class='hr-sm'>-->

        <table class='table table-list wrap-checkbox'>
            <tr class="abcd">
                <td class="member-th-sort" ng-click="toggle(1)">用户ID<i ng-if="sortName == 1"
                                                class="fa fa-sort-{{sortIcon}}"></i></td>
                <td>微信昵称 </td>
                <td>性别</td>
                <td>角色类型 </td>
                <td>电话 </td>
                <td class="member-th-sort" ng-click="toggle(2)">积分<i ng-if="sortName == 2 "
                                              class="fa fa-sort-{{sortIcon}}"></i></td>
                <td class="member-th-sort" ng-click="toggle(3)">累计金额<i ng-if="sortName == 3"
                                                class="fa fa-sort-{{sortIcon}}"></i> </td>
                <td class="member-th-sort" ng-click="toggle(4)">可提现金额<i ng-if="sortName == 4"
                                                 class="fa fa-sort-{{sortIcon}}"></i> </td>
                <td>下级人数 </td>

            </tr>
            <tr ng-repeat='user in users'>
                <td >{{user.id}}</td>
                <td class="members-index-userName" ng-click="seeDetails(user.id,user.role_id,user.nextall)">{{user.nickname}}</td>
                <td>{{user.sex_txt}}</td>
                <td class="members-index-userRole">{{user.role_txt}}</td>
                <td>{{user.mobile}}</td>
                <td class="members-index-num">{{user.score}} 分</td>
                <td class="members-index-num">{{user.amount}} 元</td>
                <td class="members-index-num">{{user.wallet}} 元</td>
                <td>{{user.nextall}} 人</td>
                <!--<td class="members-index-handle" ng-click="change_user_info(user.id,user.role_id,user.mobile)">
                    <i class="fa fa-pencil"></i>
                    <span>编辑</span>
                </td>-->
            </tr>
        </table>

        <div class='box-page' ng-bind-html='pages'></div>

    </div>

    <div class='modal fade change-user-role'>
        <div class='modal-dialog'>
            <div class='modal-content'>
                <div class='modal-header'>
                    会员管理
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body form-horizontal'>
                    <div class="form-group">
                        <label class="col-sm-offset-1 col-sm-3  control-label">角色分类：</label>
                        <div class="col-sm-6">
                            <select class="form-control" ng-model="role" ng-options="role.code as role.name for role in roles"><option value="">请选择</option></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-offset-1 col-sm-3 control-label">电话：</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" ng-model="user_mobile" placeholder="请输入电话">
                        </div>
                    </div>
                </div>
                <div class='modal-footer'>
                    <button class='btn btn-primary btn-sm btn-w-sm' ng-click='save_userinfo(changeUserId)'>确定</button>
                    <button class='btn btn-default btn-sm btn-w-sm' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>

    <div class='modal fade modal-add-user'>
        <div class='modal-dialog'>
            <div class='modal-content' align='center'>
                <div class='modal-header'>
                    用户添加
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <table class='table-form'>
                        <tr>
                            <td class='td-label'>用户名:</td>
                            <td><input type='text' class='form-control input-sm' ng-model='aUsername'></td>
                        </tr>
                        <tr>
                            <td class='td-label'>密&nbsp;&nbsp;&nbsp;码:</td>
                            <td><input type='password' class='form-control input-sm' ng-model='aPassword'></td>
                        </tr>
                        <tr>
                            <td class='td-label'>密&nbsp;&nbsp;&nbsp;码:</td>
                            <td><input type='password' class='form-control input-sm' ng-model='aRepassword'></td>
                        </tr>
                        <tr>
                            <td class='td-label'>邮&nbsp;&nbsp;&nbsp;箱:</td>
                            <td><input type='text' class='form-control input-sm' ng-model='aEmail'></td>
                        </tr>
                    </table>
                </div>
                <div class='modal-footer'>
                    <button class='btn btn-primary btn-sm btn-w-sm' ng-click='add_user()'>确认</button>
                    <button class='btn btn-default btn-sm btn-w-sm' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>
</div>